<extend name="Public:base" />
<block name="left">
    <ul class=" ">
        <li class=""><a href="{:U('Person/mydata')}">基本资料</a></li>
        <li class=""><a href="{:U('Person/mysch')}">我的学校</a></li>
        <li><a href="">社交网站</a></li>
    </ul>
</block>
<block name="right">
    <div class="ziliao">
        <!--  -->
        <div class="information">
            <div class="name">
                <p class="font-14 font-333 fw">您好，<span class="yonghuming font-orange2">{$userinfos.username}</span>尽情享受美好宁静的时光吧</p>
            </div>
            <div class="name_information">
                <div class="name_left" style="border-right:none;">
                    <div class="touxiang_tu">
                        <img src="//www.tuandai.com/img/avatar/tdface/tdface20.jpg" id="baseBody_body_body_headimg" alt="">
                        <p class="font-14 font-orange tx_t"><a href="{:U('Person/face')}" class="font-14 font-orange">[更换头像]</a></p>
                    </div>
                    <div class="information_liebiao">
                        <ul>
                            <li class="font-14 font-9993">昵&nbsp;&nbsp;称：</li>
                            <li class="font-14 font-9993">会员等级：VIP {$userinfos.vip}</li>
                            <li class="font-14 font-9993">会员期限：</li>
                            <li class="font-14 font-9993 no1">
                                安全认证：
                                <a href="/member/Validate/index.aspx">
                                        <i style="background: url('//js2.tdw.cn/images/member/icon.png') 0px -24px;" title="实名认证"></i>
                                        
                                        <b style="background: url('//js2.tdw.cn/images/member/icon.png') -24px -24px;" title="邮件认证"></b>
                                        
                                        <s style="background: url('//js2.tdw.cn/images/member/icon.png') -48px -24px;" title="安全问题设置"></s>
                                        
                                        <em style="background: url('//js2.tdw.cn/images/member/icon.png') -72px -24px;" title="银行卡绑定"></em>
                                        
                                    </a>
                            </li>
                        </ul>
                    </div>
                    <div class="connectionmm">
                        <ul>
                            <li><a href="{:U('Person/nickname')}" class="font-14 font-orange">[修改昵称]</a></li>
                            <li><a href="{:U('Person/vip')}" class="font-14 font-orange">[升级等级]</a></li>
                            <li><a href="" class="font-14 font-orange"></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!--  -->
        <br>
        <div class="ziliao2">
            <form action="/index.php/home/person/edit_done" method="post" onsubmit=" return yj_submit()">
                <!--    <div  class="col-xs-12">
            <div>生日：</div>

        </div> -->
                <div class="col-xs-12 ziliaocheng">
                    <label class="label-name" for="province-select">城市</label>
                    <span id="city_area">
                        <select class="prov"><option selected="selected" value="北京">北京</option><option value="天津">天津</option><option value="河北">河北</option><option value="山西">山西</option><option value="内蒙古">内蒙古</option><option value="辽宁">辽宁</option><option value="吉林">吉林</option><option value="黑龙江">黑龙江</option><option value="上海">上海</option><option value="江苏">江苏</option><option value="浙江">浙江</option><option value="安徽">安徽</option><option value="福建">福建</option><option value="江西">江西</option><option value="山东">山东</option><option value="河南">河南</option><option value="湖北">湖北</option><option value="湖南">湖南</option><option value="广东">广东</option><option value="广西">广西</option><option value="海南">海南</option><option value="重庆">重庆</option><option value="四川">四川</option><option value="贵州">贵州</option><option value="云南">云南</option><option value="西藏">西藏</option><option value="陕西">陕西</option><option value="甘肃">甘肃</option><option value="青海">青海</option><option value="宁夏">宁夏</option><option value="新疆">新疆</option><option value="香港">香港</option><option value="澳门">澳门</option><option value="台湾">台湾</option><option value="国外">国外</option></select> 
                        <select class="city"><option selected="selected" value="东城区">东城区</option><option value="西城区">西城区</option><option value="崇文区">崇文区</option><option value="宣武区">宣武区</option><option value="朝阳区">朝阳区</option><option value="丰台区">丰台区</option><option value="石景山区">石景山区</option><option value="海淀区">海淀区</option><option value="门头沟区">门头沟区</option><option value="房山区">房山区</option><option value="通州区">通州区</option><option value="顺义区">顺义区</option><option value="昌平区">昌平区</option><option value="大兴区">大兴区</option><option value="平谷区">平谷区</option><option value="怀柔区">怀柔区</option><option value="密云县">密云县</option><option value="延庆县">延庆县</option></select>
                        <select  class="dist" disabled="disabled"></select>

                    </span>
                </div>
                <br>
                <div class="col-xs-12 ziliaosex">
                    <label class="label">性别</label>
                    <!--        <label>
                        <input name="sex" value="0" hidefocus="true" autocomplete="off" <if condition="$userinfos['sex'] eq 0">checked="checked"</if> type="radio">
                        保密
                    </label> -->
                    <label>
                        <input name="sex" value="1" hidefocus="true" autocomplete="off" <if condition="$userinfos['sex'] eq 1">checked="checked"</if> type="radio"> 男
                    </label>
                    <label>
                        <input name="sex" value="2" hidefocus="true" autocomplete="off" <if condition="$userinfos['sex'] eq 2">checked="checked"</if> type="radio"> 女
                    </label>
                </div>
                <br>
                <div class="col-xs-12 ziliaozhi">
                    <label class="label-name" for="nick">爱好</label>
                    <input id="job" class="rlf-input rlf-input-nick" placeholder="请输入你最喜欢的爱好" value="{$userinfos.job}" data-validate="nick" autocomplete="off" name="job" type="text">
                </div>
                <br>
                <div class="col-xs-12">
                    <label class="label-name" for="nick">大学</label>
                        <select id="school" name="school">
                            <if condition="$userinfos.school neq ''">
                                <option value="{$userinfos.school}" selected="selected">{$userinfos.school}</option>
                            <else/>
                                <option value="0">请选择</option>
                            </if>
                        </select>
                        <script>
                            //加载所有学校
                            for (var i = 0; i < schoolList.length; i++) {
                                $('#school').append("<option value = '"+schoolList[i]+"'>"+schoolList[i]+"</option>");
                            }
                            $(function(){
                                $('select').searchableSelect();
                            });
                        </script>

                    <!--   <label class="label-name label_signature" for="aboutme">签名</label>
                        <textarea class="textarea textarea_signature" rows="5" cols="30" id="signature">{$userinfos.intro}</textarea> -->
                </div>
                <br>
                <div>
                    <input type="submit" name="submit" value="保 &nbsp存">
                </div> &nbsp &nbsp
            </form>
        </div>
        <!--  -->
    </div>
    <!-- 城市选择 -->
    <script type="text/javascript" href="__STATIC__/jquery.cityselect.js"></script>
    <script type="text/javascript">
    $('input[name=job]').val('{$userinfos.job}');
    $(function() {
        $("#city_area").citySelect({
            prov: "{$prov}",
            city: "{$city}",
            dist: "{$dist}",
            nodata: "none",
            url: "__STATIC__/city.min.js"
        });
        $("#btn_submit").click(function() {
            var nickname = $("#nickname").val();
            var job = $("#job").val();
            var sex = $("input[name=sex]:checked").val();
            var signature = $("#signature").val();
            var area = '';
            $("#city_area").children("select").each(function() {
                area += $(this).val() + ",";
            })
            checkBefore('#btn_submit');
            $.post("__CONTROLLER__/updateInfo", { nickname: nickname, job: job, area: area, sex: sex, signature: signature }, function(data) {
                $("#signed_textarea").val(signature);
                $(".job-title").html(job);
                $(".myname").html(nickname);
                checkAfter('#btn_submit');
                showSuccessTip('资料修改成功！');
            }, "json")
        })
    })
    </script>
    <script type="text/javascript">
    window.onload = function() {
        var oDiv = document.getElementById("tab");
        var oLi = oDiv.getElementsByTagName("div")[0].getElementsByTagName("li");
        var aCon = oDiv.getElementsByTagName("div")[1].getElementsByTagName("div");
        var timer = null;
        for (var i = 0; i < oLi.length; i++) {
            oLi[i].index = i;
            oLi[i].onclick = function() {
                show(this.index);
            }
        }

        function show(a) {
            index = a;
            var alpha = 0;
            for (var j = 0; j < oLi.length; j++) {
                oLi[j].className = "";
                aCon[j].className = "";
                aCon[j].style.opacity = 0;
                aCon[j].style.filter = "alpha(opacity=0)";
            }
            oLi[index].className = "cur";
            clearInterval(timer);
            timer = setInterval(function() {
                    alpha += 2;
                    alpha > 100 && (alpha = 100);
                    aCon[index].style.opacity = alpha / 100;
                    aCon[index].style.filter = "alpha(opacity=" + alpha + ")";
                    alpha == 100 && clearInterval(timer);
                },
                5)
        }
    }


    function yj_submit(){
        return true;
    }
    </script>
</block>